CC=gcc
BINARY1=hello
BINARY2=example
BINARIES=$(BINARY1) $(BINARY2)
LIBS=hildon-1 gtk+-2.0

all: $(BINARIES)
	@echo ""
	@echo "to run the compiled binaries:"
	@echo "$$ run-standalone.sh ./$(BINARY1)"
	@echo "$$ run-standalone.sh ./$(BINARY2)"

$(BINARY1): $(BINARY1).o
	gcc `pkg-config --libs $(LIBS)` $(BINARY1).o -o $(BINARY1)

$(BINARY1).o: $(BINARY1).c
	gcc `pkg-config --cflags $(LIBS)` $(BINARY1).c -c

$(BINARY2): $(BINARY2).o
	gcc `pkg-config --libs $(LIBS)` $(BINARY2).o -o $(BINARY2)

$(BINARY2).o: $(BINARY2).c
	gcc `pkg-config --cflags $(LIBS)` $(BINARY2).c -c

clean:
	rm -f *.o $(BINARIES)
